<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="/js/category_view.js"></script>
<head th:include="/base/common_css('test')">
<body>
<div th:include="/base/common_banner"></div>
<!-- Main content starts -->

<div class="content">
    <!-- Sidebar -->
    <div th:include="/base/common_menu"></div>
    <!-- Sidebar
    <div class="sidebar">
        <div class="sidebar-dropdown"><a href="#">Navigation</a></div>

    </div>-->
    <!-- Matter -->
    <div class="mainbar">
        <!-- Page heading -->
        <div th:include="/base/common_pageHeader"></div>

        <div class="matter">
            <div class="container">
                <div class="row">
                    <div class="col-md-6">


                        <div class="widget wgreen">

                            <div class="widget-head">
                                <div class="pull-left">分类编辑</div>
                                <div class="widget-icons pull-right">
                                    <a href="#" class="wminimize"><i class="icon-chevron-up"></i></a>
                                    <a href="#" class="wclose"><i class="icon-remove"></i></a>
                                </div>
                                <div class="clearfix"></div>
                            </div>

                            <div class="widget-content">
                                <div class="padd">

                                    <!-- Form starts.  -->
                                    <form class="form-horizontal" role="form" action="#" method="post">

                                        <div class="modal-body">
                                            <form action="#" method="post"
                                                  enctype="multipart/form-data">
                                                <input class="col-lg-4 form-control " type="hidden" id="cateId"
                                                       th:value="${cateId}">
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">分类名</label>
                                                    <div class="col-lg-8">
                                                        <input type="text" th:value="${cateName}" class="form-control"
                                                               id="cateName" placeholder="分类名"
                                                               onclick="checkvalue(1,this);"
                                                               onkeyup="checkvalue(1,this);"
                                                               title="请输入分类名,不能为空"><label
                                                            id="tip1"
                                                            style="color:#12aeff;font-size:12px"></label>
                                                    </div>
                                                </div>

                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">分类描述</label>
                                                    <div class="col-lg-8">
                                                        <input type="text" th:value="${cateDescription}"
                                                               class="form-control" id="cateDescription"
                                                               placeholder="分类描述" onclick="checkvalue(2,this);"
                                                               onkeyup="checkvalue(2,this);"
                                                               title="不能为空，25个字以内"><label id="tip2"
                                                                                          style="color:#12aeff;font-size:12px"></label>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">所属分组</label>
                                                    <div class="col-lg-8">
                                                        <select id="groupId" class="selectpicker show-tick form-control">
                                                            <option th:each="group, groupStat:${groupList}"
                                                                    th:value="${group.groupId}"
                                                                    th:text="${group.groupName}"
                                                                    th:selected="${group.groupId == groupId}"></option>
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">状态</label>
                                                    <div class="col-lg-8">
                                                        <select id="isShow" th:value="${isShow}"
                                                                class="selectpicker show-tick form-control">
                                                            <option value="0">显示</option>
                                                            <option value="1">隐藏</option>
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">序号</label>
                                                    <div class="col-lg-8">
                                                        <input type="text" th:value="${sort}" class="form-control"
                                                               id="sort" placeholder="序号">
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </form>
                                    <div class="modal-footer">
                                        <button type="button" onclick="saveCategory()"
                                                class="btn btn-success">保存
                                        </button>
                                        <button type="button" class="btn btn-cancel"
                                                onclick="cancel()">取消
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<!-- Mainbar ends -->
<div class="clearfix"></div>

</div>
<!-- Content ends -->

<div th:include="/base/common_footer"></div>
<!-- Scroll to top -->
<span class="totop"><a href="#"><i class="icon-chevron-up"></i></a></span>
<!--js????-->
<div th:include="/base/common_js"></div>
<script type="text/javascript">

</script>
</body>
</html>